version: "3.5"
services:
    gopher:
        build:
            context: .
            dockerfile: "docker/app/Dockerfile"
            args:
                HOST_UID: ${HOST_UID}
        container_name: "gopher"
        volumes:
            - ./:/var/www/app
        ports:
            - "8044:8080"
        extra_hosts:
            - "database.lan:${DATABASE_IP}"
            - "zendblog.xelbot.com:${APPLICATION_IP}"
        networks:
            - blognet

    varnish:
        image: varnish:7.2-alpine
        container_name: "reprogl_varnish"
        environment:
            BAN_TOKEN: ${BAN_TOKEN}
        volumes:
            - ./docker/varnish/default.vcl:/etc/varnish/default.vcl:ro
        tmpfs:
            - /var/lib/varnish:exec,uid=100,gid=101
        ports:
            - "8086:80"
        links:
            - gopher
        depends_on:
            - gopher
        networks:
            - blognet

networks:
    blognet:
        external: true
